﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserInBlogFriendGroupAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Blog.UserInBlogFriendGroupAdmin" %>
<owc:OwGrid ID="UsersInBlogFriendGroupsdv" runat="server" SkinID="OwGridAdmin" DataSourceID="UsersInBlogFriendGroupsOds"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True"
    OwMessageDisplayType="InPlace" 
    OnItemDataBound="UsersInBlogFriendGroupsdv_ItemDataBound">
    <MasterTableView DataSourceID="UsersInBlogFriendGroupsOds" DataKeyNames="UsersInBlogFriendGroupsID">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("UsersInBlogFriendGroupsID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="UserNameOwR" runat="server" OwText="UserName" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("UserID") != null ? (Membership.GetUser((Guid?)Eval("UserID")) != null ? Membership.GetUser((Guid?)Eval("UserID")).UserName : "n/a") : "n/a"%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="BlogFiendGroupOwR" OwText="BlogFiendGroup" runat="server" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwBlogFriendGroupsBLL.OwGetEntity((long?)Eval("BlogFriendGroupID")).Name%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Eval("IsDeleted")%>'
                                    CssClass="HiddenText" OnCheckedChanged="IsDeletedCheckBox_CheckedChanged1" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Literal ID="ApproveLiteral" runat="server" Text="<%$ OwR: Approve%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsAprrovedCheckBox" runat="server" Checked='<%#Eval("IsApproved")%>'
                                    Text="" CssClass="HiddenText" OnCheckedChanged="IsAprrovedCheckBox_CheckedChanged1" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <EditItemTemplate>
                    <asp:LinkButton ID="Updatelb" runat="server" CommandName="Update" Text="<%$ OwR: Update %>"></asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="Cancellb" runat="server" CausesValidation="false" CommandName="Cancel"
                        Text="<%$ OwR: Cancel %>"></asp:LinkButton>
                </EditItemTemplate>
                <ItemTemplate>
                    <a href='/Admin/Views/Site/UserInBlogFriendGroupEdit.aspx?id=<%#Eval("UsersInBlogFriendGroupsID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a> </owc:OwButton> <a id="linkDelete" runat="server" href="#"
                                title="Confirm delete">
                                <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif' runat="server"
                                    id="DeleteImage" alt='<%$ OwR:DeleteCommandLabel %>' />
                            </a>
                    <asp:Button runat="server" CommandName="del" ID="btnDelete" CssClass="displaynone"
                        Text='<%$ OwR:DeleteCommandLabel %>' />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template" PopUpSettings-ScrollBars="Vertical" PopUpSettings-Modal="true">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <table style="width: 800px">
                    <tr>
                        <td align="left">
                            <owc:OwR ID="BlogFriendGroupOwR" runat="server" OwText="BlogFriendGroup" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwComboBox ID="BlogFriendGroupCbb" runat="server" DataTextField="Name" DataValueField="BlogFriendGroupID"
                                DataSourceID="BlogFiendGroupOds">
                            </owc:OwComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="UserNameOwR" runat="server" OwText="UserName" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwComboBox ID="UserNameCbb" runat="server" SelectedValue='<%#Bind("UserID") %>'>
                            </owc:OwComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:
                        </td>
                        <td>
                            <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Bind("IsDeleted")%>'
                                CssClass="HiddenText" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Literal ID="ApproveLiteral" runat="server" Text="<%$ OwR: Approve%>" />:
                        </td>
                        <td>
                            <owc:OwCheckBox ID="IsAprrovedCheckBox" runat="server" Checked='<%#Bind("IsApproved")%>'
                                Text="" CssClass="HiddenText" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <owc:OwConfirmButton ID="btnUpdate" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                            <owc:OwConfirmButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text='<%$ OwR:Cancel %>' />
                        </td>
                    </tr>
                </table>
            </FormTemplate>
            <PopUpSettings ScrollBars="Vertical" Modal="True"></PopUpSettings>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="UsersInBlogFriendGroupsOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwUsersInBlogFriendGroupsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwUsersInBlogFriendGroupsBLL"
    UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="usersInBlogFriendGroupsID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter DbType="Guid" Name="userID" />
        <asp:Parameter Name="isApproved" Type="Boolean" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="blogFriendGroupID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwObjectDataSource ID="BlogFiendGroupOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogFriendGroupsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetAll" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogFriendGroupsBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
